package cn.hanyx.vlog.bussiness.feign;

import cn.hanyx.vlog.api.dto.ResponseObject;
import cn.hanyx.vlog.api.vo.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

/**
 * OrderFeign
 *
 * @author hanyx
 * @date 2021/11/28
 */
@FeignClient(value = "order-service")
@RequestMapping("/order")
@Service
public interface OrderFeign {

    @PostMapping
    public ResponseObject save(@RequestBody Order order);

    @GetMapping("/{orderId}")
    public ResponseObject<Order> findByOrderId(@PathVariable(value = "orderId") Integer orderId);

}
